package com.idvert.smsdemo.models;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * Created by jigang.duan on 2017/12/8.
 */

public class PhoneMessage implements Parcelable {

    private String number;
    private String content;
    private String time;

    public PhoneMessage(String number, String content, String time) {
        this.number = number;
        this.content = content;
        this.time = time;
    }

    public String getNumber() {
        return number;
    }

    public void setNumber(String number) {
        this.number = number;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public String getTime() {
        return time;
    }

    public void setTime(String time) {
        this.time = time;
    }

    protected PhoneMessage(Parcel in) {
        number = in.readString();
        content = in.readString();
        time = in.readString();
    }

    @Override
    public void writeToParcel(Parcel out, int flags) {
        out.writeString(number);
        out.writeString(content);
        out.writeString(time);
    }

    public static final Creator<PhoneMessage> CREATOR = new Creator<PhoneMessage>() {
        @Override
        public PhoneMessage createFromParcel(Parcel in) {
            return new PhoneMessage(in);
        }

        @Override
        public PhoneMessage[] newArray(int size) {
            return new PhoneMessage[size];
        }
    };

    @Override
    public int describeContents() {
        return 0;
    }


}
